<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    /* transition animation */
    .box {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      border: 1px solid red;
      background-color: green;
      /* 
        动画:  
        动画名称
        动画执行时间
        速度曲线=>匀速linear
        2s 延迟多久执行
        infinite 反复执行 如果写成1就是只执行一次
        alternate 往返播放
    */
      /* animation: move 3s linear 0.2s infinite alternate; */
    }
    @keyframes move {
      0% {
        transform: translateX(10px);
      }
      50% {
        transform: translateX(500px);
      }
      100% {
        transform: translateX(1000px);
      }
    }
    @keyframes scale {
      0% {
        transform: scale(1);
      }
      25% {
        transform: scale(1);
        background-color: pink;
      }
      50% {
        transform: scale(1.5);
        background-color: red;
      }
      100% {
        transform: scale(2);
        background-color: rgb(104, 192, 233);
      }
    }
  </style>

  <body>
    <div class="box"></div>
  </body>
</html>
